<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Talking 后台管理 -- 我们致力于打造最专业的贴吧</title>
<link rel="stylesheet" href="./static/css/frame.css" />
<script src="./static/js/jquery-1.3.min.js"></script> 
<script src="./static/js/jquery.form.js"></script>
<script src="./static/js/common.js"></script>
<script>
$(document).ready(function(){
    $.del = function(file,rowIndex){
        var options = {
            data         : {action : 'delete',file : file},            
            dataType     : 'json',
            success      :  function(data){
                $('tr:eq('+rowIndex+')').remove();
            }
        };
        $('#form').ajaxSubmit(options);
    }
});
</script>
</head>

<body>
<div id="content">
    <div class="title">帖子 » 附件管理</div>
    <div class="main">
        <h3>附件管理</h3>
        <form name="form" action="./attach.php" method="post" id="form">
        <table cellpadding="0" cellspacing="0" class="list">
            <tbody>
                <tr>                                       
                    <td>文件名称</td>
                    <td width="80" align="center">文件大小</td>
                    <td width="150" align="center">创建时间</td>
                    <td width="30" align="center">删除</td>
                </tr>
                {{section name=n loop=$array}}
                <tr>                                                                                                                                                       
                    <td>{{$array[n].name}}</td>
                    <td align="center">{{$array[n].size}}</td>
                    <td align="center">{{$array[n].time}}</td>
                    <td align="center"><a href="javascript:void(0)" onclick="$.del('{{$array[n].name}}',this.parentNode.parentNode.rowIndex)"><img src="./static/images/delete.gif" class="icon" title="下载"/></a></td>
                </tr>
                {{/section}}
            </tbody>
        </table>
        </form>  
    </div>
</div>
</body>
</html>
